﻿{% extends "meetup_group_frame.html" %}
{% load location_filter %
{% block title %}
寻找离你最近的碰头组!
{% endblock %}

{% block custom_header %}
<script type="text/javascript" src="/static/js/meetup_group_search.js"></script>
<script type="text/javascript" src="/static/js/meetup_charsets.js"></script>

{% endblock %}

{% block content %}
<div id="C_page">
    <div id="C_pageBody">
        <div style="min-height: 1096px;" id="C_context">
            <div id="C_group_search_document" class="">
                <div class="D_box calltoaction">
                    <div class="D_boxbody">
                        <div class="D_boxhead">
                            <h2>寻找离您最近的碰头组</h2>
                            <p>在<strong>{{total_group_num}}个碰头组</strong>中寻找离您最近的聚友活动组......</p>
                        </div>
                        <div class="D_boxsection">
                            <form method="post" action="javascript:document.getElementById('search_group').click()">
                                <div id="locMenu" class="D_form D_form_compact">
                                    <div class="element">
                                        <div class="label">
                                            <label>小组兴趣名称</label>
                                        </div>
                                        <div class="input">
                                          <input id="group_name" name="" size="25" maxlength="100"  type="text" value="{{form.name.data|default:""}}" >
                                        </div>
                                    </div>
                                    <div class="element">
                                        <div class="label">
                                            <label>&nbsp;</label>
                                        </div>
                                    </div>
                                    <div class="element coPicker"> <span class="label">
                                            <label for="co">城市</label>
                                        </span> <span class="input">
                                        <select name="city" id="city" class="locNameUpdateCountry">
                                                <option value="任意">-----任意-----</option>
                                                {% for city in city_district %}
                                                <option value="{{city}}">{{city}}</option>
                                                {% endfor %}
                                            </select>
                                        </span> </div>
                                    <div class="sometimesImHere"></div>
                                    <div id="locPicker" class="element">
                                        <div id="locSwitchable"> <span class="label">
                                                <label for="zip" id="zipLabel">市区</label>
                                            </span> <span class="input">
                                                <select name="district" id="district">
                                                    <option value="任意">-----任意-----</option>
                                                </select>
                                            </span> </div>
                                    </div>
                                    <!-- Search Button -->
                                    <div class="footElement">
                                        <input name="search_group" id="search_group" value="搜索" class="D_submit" type="button" />
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <script type="text/javascript">
                    function GetFieldPair(id) {
                        return id + "=" + encodeURI($('#'+id).val());
                    }
                    function GetUrlParams() {
                      var url_params = GetFieldPair('group_name') + '&' + GetFieldPair('city') + '&' + GetFieldPair('district');
                      return url_params;
                    }                  
                    var searchresult_url = '/searchresult/search_group';
                    var list_col_name = ["", "小组名称", "兴趣描述"];
                    var list_col_size = ["18%", "20%", "60%"];
                </script>
                <link href="/static/css/searchresult.css" rel="stylesheet" type="text/css" />
                <script type="text/javascript" src="/static/searchlistcomponent/searchlist_content.js"></script>
                <script type="text/javascript" src="/static/searchlistcomponent/searchlist_showing.js"></script>
            </div>
        </div>
        <!-- C_context -->
    </div>
    <!-- C_pageBody -->
</div>
<!-- C_page -->
{% endblock %}
